style context: Don't use g_warning for API misuse
authorMatthias Clasen <mclasen@redhat.com>
Fri, 18 Mar 2016 01:48:53 +0000 (21:48 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 21 Mar 2016 00:53:34 +0000 (20:53 -0400)
We've changed our API here; what these applications are doing
used to be fine. Don't make users suffer for this by spamming their
logs in a stable release. We'll keep the warning in master.

https://bugzilla.gnome.org/show_bug.cgi?id=763796

gtk/gtkstylecontext.c

index ed1ad917bb249aee644470068086239ffa5e7f9a..f5da8cab76aa1f226ae1297ae0599130830e386c 100644 (file)
@@ -508,13 +508,13 @@ gtk_style_context_push_state (GtkStyleContext *context,
   else if (GTK_IS_CSS_WIDGET_NODE (root))
     {
       GtkWidget *widget = gtk_css_widget_node_get_widget (GTK_CSS_WIDGET_NODE (root));
-      g_warning ("State %u for %s %p doesn't match state %u set via gtk_style_context_set_state ()",
-                 state, gtk_widget_get_name (widget), widget, gtk_css_node_get_state (priv->cssnode));
+      g_debug ("State %u for %s %p doesn't match state %u set via gtk_style_context_set_state ()",
+               state, gtk_widget_get_name (widget), widget, gtk_css_node_get_state (priv->cssnode));
     }
   else
     {
-      g_warning ("State %u for context %p doesn't match state %u set via gtk_style_context_set_state ()",
-                 state, context, gtk_css_node_get_state (priv->cssnode));
+      g_debug ("State %u for context %p doesn't match state %u set via gtk_style_context_set_state ()",
+               state, context, gtk_css_node_get_state (priv->cssnode));
     }
 
   gtk_css_node_set_state (priv->cssnode, state);